﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;


namespace miSuperEngine
{
    public static class SceneManager
    {
        public static Random rand = new Random();
        public static ContentManager Content;
        static List<Scene> scenes = new List<Scene>();
        public static Vector2 screenSize = new Vector2(800, 600);
        public static Input input=new Input();
        public static void update(GameTime gt)
        {
            scenes.Last().update(gt);
            scenes.Last().handleInput();
            input.update(gt);
        }
        public static void draw(SpriteBatch sb)
        {
            foreach (Scene sc in scenes)
            {
                sc.draw(sb);
            }
        }
        
        public static void addScene(Scene sc)
        {
            scenes.Add(sc);
        }
    }
}
